package com.example.zlw.dem1;

import java.util.function.Consumer;
import java.util.function.Predicate;

/**
 * @program: Zlw
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-11-04 20:42
 **/
public class Test {
    public static void main(String[] args) {
        //在Predicate中有这个方法boolean test(T t);
        // 这个是判断事件正确与否，只返回布尔值
        Predicate<String> predicate= t->t.length()>5;
        String me="app is one ";
        fun(predicate,me);
    }
    public static  void fun(Predicate<String> predicate,String t){
        boolean test = predicate.test(t);
        System.out.println("********"+test);
    }


    public static void fun(Integer integer) {
    }
}



